import { Component, OnInit,HostListener } from '@angular/core';
// import { PageModel } from "../../model/page-model";
import { MyHttp } from '../../service/MyHttp';
declare let AMap:any;
declare let $:any;
declare let window:any;
@Component({
  selector: 'app-member',
  templateUrl: './member.component.html',
  styleUrls: ['./member.component.css']
})

export class MemberComponent implements OnInit { 
//   pageModel = new PageModel();
//   page: number = 1;
  listdata:any;
  keyWord:any;
  constructor(private myHttp: MyHttp) {

  }

  getlist(){
    this.myHttp.post('league/findAll', {}).subscribe(res => {
      if (res.errorCode == 0) {         
        this.listdata = res.message;
      }
  
    });
  }

  search(){
    this.myHttp.post('league/findAll', {key_word:this.keyWord}).subscribe(res => {
        if (res.errorCode == 0) {           
          this.listdata = res.message;
        }
    
      });
  }




  
ngOnInit() {  
   this.getlist()
}



    




}
